package com.jxd.project.travel.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jxd.project.travel.dao.IEmpDao;
import com.jxd.project.travel.model.Emp;
import com.jxd.project.travel.service.IEmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName EmpServiceImpl
 * @Description TODO
 * @Author 邢子剑
 * @Date 2025/10/6 上午11:03
 * @Version 1.0
 */
@Service
public class EmpServiceImpl extends ServiceImpl<IEmpDao, Emp> implements IEmpService {
    @Autowired
    private IEmpDao empDao;


    @Override
    public String getEnameByEmpno(int empno) {
        LambdaQueryWrapper<Emp> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(Emp::getEmpno, empno);
        Emp emp = empDao.selectOne(queryWrapper);
        return emp.getEname();
    }
}
